<template>
    <div>
        <h1>列表渲染</h1>
        <table>
            <thead>
                <tr>
                    <td>编号</td>
                    <td>姓名</td>
                    <td>操作</td>
                </tr>
            </thead>
            <tbody>
                <tr v-for="item in student" :key="item.id">
                    <td>{{ item.id }}</td>
                    <td>{{ item.name }}</td>
                    <td>
                        <button>删除</button>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</template>

<script setup>
import { ref } from 'vue'
const student = ref([
    {id:1,name:"张三"},
    {id:2,name:"李四"},
    {id:3,name:"王五"}
])
</script>

<style scoped>

</style>